//vuex 播放下一首

import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
	state:{
		toListIds:[],
		nextId:''
	},
	mutations:{
		INIT_TOPLISTIDS(state,payload){
			state.toListIds = payload
		},
		NEXT_ID(state,payload){
			for(var i=0;i<state.toListIds.length;i++){
				if(state.toListIds[i].id == payload){
					state.nextId = state.toListIds[i+1].id
				}
			}
		}
		
	}
})
